package com.tan.androidtest.java;

/**
 * 测试java中传参是传递的值  还是传递的引用
 */

public class TestMethodPassValue {

    static StringBuffer ss = new StringBuffer("2211");

    public static void main(String[] args) {
        String a = "222";
        StringBuffer buffer = new StringBuffer("333");

        change(ss);
        System.out.println(ss);

        byte a1 = 2;
        byte a2 = 4;
        byte a3;
        short s = 16;
        //a2 = s;
        int re = a1 * a2;
        System.out.println(a1 * a2);

    }


    public static StringBuffer change(StringBuffer str) {

        str = new StringBuffer("222333322");
        return str;
    }


}
